package com.bdc.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;

import com.bdc.bean.TabConf;
import com.bdc.service.ServiceFactory;

@SuppressWarnings("serial")
public class BaodaCraftServlet extends HttpServlet {
	
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
		String pageId = req.getParameter("pageId");
		
		if(pageId == null) {
			pageId = "0";
		}
		
		List<TabConf> tabs = ServiceFactory.getConfService().getTabConfs();
		req.setAttribute("pageId", pageId);
		req.setAttribute("tabs", tabs);
		RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/jsp/index.jsp");
		dispatcher.forward(req, resp);
	}
}
